/*
 *  ekk_subtitle_dec_pic.h
 *  EKK_Player_Lib
 *
 *  Created by xl on 11-7-21.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef _DEC_SUBTITLE_H_0721_
#define _DEC_SUBTITLE_H_0721_

#ifdef __cplusplus
extern "C"
{
#endif
		
#include "ekk_interface.h"
#include "ekk_base/ekk_model_loader.h"
//may increase interface
typedef struct{
	int head;
	void (*dec_subtitle_proxy_init)();
	void (*dec_subtitle_proxy_uninit)();
	void* (*dec_subtitle_proxy_creat)();
	void (*dec_subtitle_proxy_close)(void* hd);
	void (*dec_set_attribute_subtitle_proxy)(int* x,int* y,unsigned long* rgba,char* fonttype,int* fontsize,void* hd);
	void (*dec_get_attribute_subtitle_proxy)(int* x,int* y,unsigned long* rgba,char** fonttype,int* fontsize,void* hd);
	void (*dec_subtitle_to_bitmap_proxy)(unsigned char** bitmap,char* txt,void* hd);
	void (*dec_subtitle_get_empty_bitmap_proxy)(unsigned char** bitmap,void* hd);
	
}DEC_SUBTITLE_PROXY;

#if EKK_ENABLE_SUBTITLE
    
void dec_subtitle_init();
void dec_subtitle_uninit();
DEC_SUBTITLE_HANDLE dec_subtitle_creat();	
void dec_subtitle_close(DEC_SUBTITLE_HANDLE hd);
void dec_set_attribute_subtitle(int* x,int* y,unsigned long* rgba,char* fonttype,int* fontsize,DEC_SUBTITLE_HANDLE hd);
void dec_get_attribute_subtitle(int* x,int* y,unsigned long* rgba,char** fonttype,int* fontsize,DEC_SUBTITLE_HANDLE hd);
void dec_subtitle_to_bitmap(unsigned char** bitmap,char* txt,DEC_SUBTITLE_HANDLE hd); //bitmap is backimage
void dec_subtitle_get_empty_bitmap(unsigned char** bitmap,DEC_SUBTITLE_HANDLE hd); //get empty bitmap
#else /*#if EKK_ENABLE_SUBTITLE*/
#define dec_subtitle_init()
#define dec_subtitle_uninit()
#define dec_subtitle_creat() (0)	
#define dec_subtitle_close(hd)  
#define dec_set_attribute_subtitle(x,y,rgba,fonttype,fontsize,hd)
#define dec_get_attribute_subtitle(x,y,rgba,fonttype,fontsize,hd)
#define dec_subtitle_to_bitmap(bitmap,txt,hd)
#define dec_subtitle_get_empty_bitmap(bitmap,hd)
#endif /*#if EKK_ENABLE_SUBTITLE*/

#ifdef __cplusplus
}
#endif

#endif